<extend name="Public/base"/>

<block name="body">
	<div class="main-title">
		<h2>标签管理</h2>
	</div>

	<div class="cf">
		<a class="btn" href="{:U('add','pid='.$pid)}">新 增</a>
		<button class="btn ajax-post confirm" url="{:U('Tag/del')}" target-form="ids">删 除</button>
	</div>

	<div class="data-table table-striped">
		<table class="">
		    <thead>
		        <tr>
				<th class="row-selected row-selected"><input class="check-all" type="checkbox"/></th>
				<th class="">标签名</th>
			
				<th class="">操作</th>
				</tr>
		    </thead>
		    <tbody>
				<notempty name="_list">
				<volist name="_list" id="vo">
				<tr>
		            <td><input class="ids" type="checkbox" name="id[]" value="{$vo.id}" /></td>
					
					<td>{$vo.tag_name}</td>
					
					<td>
						<a href="{:U('Tag/del?id='.$vo['id'])}" class="ajax-get">删除</a>
					</td>
				</tr>
				</volist>
				<else/>
				<td colspan="2" class="text-center"> aOh! 暂时还没有内容! </td>
				</notempty>
			</tbody>
	    </table>
	</div>
    <div class="page">
        {$_page}
    </div>
</block>

<block name="script">
<script type="text/javascript">
    $(function() {
    	//点击排序
    	$('.list_sort').click(function(){
    		var url = $(this).attr('url');
    		var ids = $('.ids:checked');
    		var param = '';
    		if(ids.length > 0){
    			var str = new Array();
    			ids.each(function(){
    				str.push($(this).val());
    			});
    			param = str.join(',');
    		}

    		if(url != undefined && url != ''){
    			window.location.href = url + '/ids/' + param;
    		}
    	});
    });
</script>
</block>